import java.util.*;

public class Menu{

	Menu(int i){
		Opreate(i);
	}

	public void Opreate(int a){
		switch (a){
			case 0:
				break;
			case 1:
				new Add();
				menuScreen();
				break;
			case 2:
				new Select();
				menuScreen();
				break;
			case 4:
				new Delete();
				menuScreen();
		}
	}

	public static void menuScreen(){
		System.out.printf("********学生信息管理系统********\n");
		System.out.printf("1.增加学生信息\n2.查找学生信息\n3.修改学生信息\n4.删除学生信息\n0.退出\n");
		System.out.printf("请输入0-4进行操作：");
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		while (a > 4 || a < 0){
			System.out.printf("非法输入，请重新输入: ");
			a = sc.nextInt();
		}
		new Menu(a);
		System.out.println();
		System.out.println();
	}
	
	public static void main(String [] args){
		menuScreen();
	}
}
